package t1_1

import (
	"src/db"
	"src/db/db_modle"
	"src/handler/tools"
	"src/modle"
	"sync"
)

// 用户年龄检测
func CheckUserAge(ch *chan modle.DetailsType, sy *sync.WaitGroup, uid uint, rrb db_modle.RiskRuleBase) {
	logId := tools.GetLogId(uid, rrb.Oid)
	InfoBase, e := db.GetInfoBaseById(uid, logId)
	if e != nil {
		// 查无此人
		tools.FillDetails(rrb.Oid, InfoBase.Age, tools.ExecuteFailed, 0, e.Error(), ch, sy)
		return
	}
	tools.OutLimit(InfoBase.Age, ch, sy, rrb, rrb.Score)
}
